//
//  TKMineTableHeaderView.m
//  Ticket
//
//  Created by 小禹宝宝 on 2017/10/13.
//  Copyright © 2017年 cy55. All rights reserved.
//

#import "TKMineTableHeaderView.h"
@interface TKMineTableHeaderView ()
@property (weak, nonatomic) IBOutlet UIView *topShadowView;
@property (weak, nonatomic) IBOutlet UIView *bottomShadowView;


@end
@implementation TKMineTableHeaderView

-(void)awakeFromNib {
    [super awakeFromNib];
    self.topShadowView.backgroundColor = [BLColorConfig backgroundColor];
    self.bottomShadowView.backgroundColor = [BLColorConfig backgroundColor];
    self.iconImageView.layer.borderWidth = 2.0f;
    self.iconImageView.layer.borderColor = [[UIColor jc_colorWithHexString:@"eeeeee"] CGColor];
    self.iconImageView.layer.cornerRadius = self.iconImageView.bounds.size.width/2;
    self.iconImageView.layer.masksToBounds = YES;
    self.iconImageView.contentMode = UIViewContentModeScaleAspectFill;

}


- (void)setModel:(TKInfo *)model {
    self.nickNameLabel.text = model.name;
    self.phoneNumberLabel.text = model.mobile;
    if (model.name.length == 0) {
        self.nickNameLabel.text = @"未设置";
    }
    [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.portrait]
                          placeholderImage:[UIImage imageNamed:@"icon_placeholder"] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
                              if (!error) {
                                  //                                  self.backgroundImageView.image = image;
                              }
                          }];
//    if ([model.sex isEqualToString:@"N"]) {
//        self.genderImageView.image= nil;
//    } else if ([model.sex isEqualToString:@"M"]) {
//        self.genderImageView.image= [UIImage imageNamed:@"nan1"];
//    } else {
//        self.genderImageView.image= [UIImage imageNamed:@"nv1"];
//    }
    
    //边框
}
@end
